<template>
  <el-form :model="addForm" label-width="130px">
    <div class="bg-white my-[10px]">
      <BaseHead>基本信息</BaseHead>
      <div class="p-[10px]">
        <el-row :gutter="20">
          <el-col :span="24">
            <el-form-item label="批准号">
              <el-input
                v-model="addForm.number"
                placeholder="批准号"
                clearable
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="项目名称">
              <el-input
                v-model="addForm.number"
                placeholder="项目名称"
                clearable
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="项目编号"> 审核通过后生成 </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="负责人">
              <el-autocomplete
                v-model="addForm.number"
                :fetch-suggestions="querySearch"
                clearable
                placeholder="请输入检索关键词"
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="负责人类型">
              <el-radio-group v-model="addForm.number">
                <el-radio :value="3">教师</el-radio>
                <el-radio :value="6">学生</el-radio>
                <el-radio :value="9">校外</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="所属单位">
              <el-select
                v-model="value"
                filterable
                placeholder="请选择所属单位"
                clearable
              >
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                />
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="项目分类">
              <el-tree-select
                v-model="value"
                :data="data"
                filterable
                placeholder="请选择项目分类"
                clearable
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="项目级别">
              <el-select
                v-model="value"
                filterable
                placeholder="请选择项目级别"
                clearable
              >
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                />
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="项目来源单位">
              <el-input
                v-model="addForm.number"
                placeholder="项目来源单位"
                clearable
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="项目状态">
              <el-radio-group v-model="addForm.number">
                <el-radio :value="3">进行</el-radio>
                <el-radio :value="6">完成</el-radio>
                <el-radio :value="9">暂停</el-radio>
                <el-radio :value="9">撤销</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="立项日期">
              <el-date-picker
                v-model="addForm.number"
                type="date"
                clearable
                placeholder="请选择立项日期"
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="开始日期">
              <el-date-picker
                v-model="addForm.number"
                type="date"
                clearable
                placeholder="请选择开始日期"
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="计划结项日期">
              <el-date-picker
                v-model="addForm.number"
                type="date"
                clearable
                placeholder="请选择计划结项日期"
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="结项日期">
              <el-date-picker
                v-model="addForm.number"
                type="date"
                clearable
                disabled
                placeholder="结项日期"
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="项目总经费">
              <el-input
                v-model="addForm.number"
                placeholder="项目总经费"
                clearable
              >
                <template #append>万元</template>
              </el-input></el-form-item
            >
          </el-col>
          <el-col :span="12">
            <el-form-item label="拨款金额">
              <el-input
                v-model="addForm.number"
                placeholder="拨款金额"
                clearable
              >
                <template #append>万元</template>
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="学校资助经费">
              <el-input
                v-model="addForm.number"
                placeholder="学校资助经费"
                clearable
              >
                <template #append>万元</template>
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="外拨经费">
              <el-input
                v-model="addForm.number"
                placeholder="外拨经费"
                clearable
              >
                <template #append>万元</template>
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="成果形式">
              <el-input
                v-model="addForm.number"
                placeholder="成果形式"
                clearable
              >
              </el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </div>
    </div>
    <div class="bg-white">
      <BaseHead>教育部统计信息</BaseHead>
      <div class="p-[10px]">
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="统计归属">
              <el-radio-group v-model="addForm.number">
                <el-radio :value="3">科技类</el-radio>
                <el-radio :value="6">社科类</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="一级学科">
              <el-select
                v-model="value"
                filterable
                placeholder="请选择一级学科"
                clearable
              >
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                />
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="社会经济服务目标">
              <el-tree-select
                v-model="value"
                :data="data"
                filterable
                placeholder="请选择社会经济服务目标"
                clearable
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="项目来源">
              <el-select v-model="value" placeholder="请选择项目来源" clearable>
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                />
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="研究类别">
              <el-select v-model="value" placeholder="请选择研究类别" clearable>
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                />
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="国民经济行业">
              <el-tree-select
                v-model="value"
                :data="data"
                filterable
                placeholder="请选择国民经济行业"
                clearable
              />
            </el-form-item>
          </el-col>
        </el-row>
      </div>
    </div>
    <div class="bg-white mt-[10px]">
      <BaseHead>详细信息</BaseHead>
      <div class="p-[10px]">
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="课题类型">
              <el-radio-group v-model="addForm.number">
                <el-radio :value="3">课题</el-radio>
                <el-radio :value="6">子课题</el-radio>
                <el-radio :value="9">项目</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="课题性质">
              <el-radio-group v-model="addForm.number">
                <el-radio :value="3">独立课题</el-radio>
                <el-radio :value="6">依托本校项目</el-radio>
                <el-radio :value="9">依托校外项目</el-radio>
              </el-radio-group>
            </el-form-item>
          </el-col>
          <!-- 依托本校项目时显示 -->
          <template v-if="true">
            <el-col :span="24">
              <el-form-item label="依托项目名称">
                <el-autocomplete
                  v-model="addForm.number"
                  :fetch-suggestions="querySearch"
                  clearable
                  placeholder="请输入检索关键词"
                />
              </el-form-item>
              <el-form-item label="依托项目负责人">
                <el-input
                  v-model="addForm.number"
                  placeholder="依托项目负责人"
                  clearable
                >
                </el-input>
              </el-form-item>
            </el-col>
          </template>
          <!-- 依托校外项目时显示 -->
          <template v-if="false">
            <el-col :span="24">
              <el-form-item label="依托项目名称">
                <el-input
                  v-model="addForm.number"
                  placeholder="依托项目名称"
                  clearable
                >
                </el-input>
              </el-form-item>
              <el-form-item label="依托项目负责人">
                <el-input
                  v-model="addForm.number"
                  placeholder="依托项目负责人"
                  clearable
                >
                </el-input>
              </el-form-item>
              <el-form-item label="依托项目单位名称">
                <el-input
                  v-model="addForm.number"
                  placeholder="依托项目单位名称"
                  clearable
                >
                </el-input>
              </el-form-item>
            </el-col>
          </template>
          <el-col :span="24" style="display: none">
            <el-form-item label="牵头人单位">
              <el-input
                v-model="addForm.number"
                placeholder="牵头人单位"
                clearable
              />
            </el-form-item>
          </el-col>
          <el-col :span="24" style="display: none">
            <el-form-item label="牵头人单位负责人">
              <el-input
                v-model="addForm.number"
                placeholder="牵头人单位负责人"
                clearable
            /></el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="备注">
              <el-input
                v-model="addForm.number"
                placeholder="备注"
                type="textarea"
                show-word-limit
                maxlength="500"
              />
            </el-form-item>
          </el-col>
        </el-row>
      </div>
    </div>
  </el-form>
</template>

<script setup>
import BaseHead from "@/views/project/components/BaseHead.vue";
const addForm = ref({
  number: "",
});
</script>

<style scoped lang="scss"></style>